//
//  CenterScrollFromView.m
//  Gxj
//
//  Created by 💋索少杰 on 2017/9/5.
//  Copyright © 2017年 wkq. All rights reserved.
//

#import "CenterScrollFromView.h"
#import "UIColor+Gradient.h"


@interface CenterScrollFromView ()

/*
 滚动视图 切图里设置
 */


@end

@implementation CenterScrollFromView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        
        //个人中心View设置  视图切弧度
        [self setCenterView];
        //视图一
        [self setViewOneUp];
        
    }
    
    return self;
}




#pragma mark - 个人中心View
- (void)setCenterView{
    //切弧度
    if (isiPhone5or5sor5cSE) {
        
    }
    UIImageView*backgroundImageView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, UIScreenWidth, kHeightScale(330))];
    backgroundImageView.image=[UIImage imageNamed:@"bg-1"];
    backgroundImageView.userInteractionEnabled = YES;
    //backgroundImageView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg-1"]];
    
    UIView *view = [[UIView alloc] init];
    view.frame = CGRectMake(0, kHeightScale(-64), UIScreenWidth, kHeightScale(420));
    //view.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg-1"]];
    view.contentMode = UIViewContentModeScaleToFill;
    CGSize finalSize = CGSizeMake(CGRectGetWidth(view.frame), kHeightScale(382));
    //CGSize finalSize = CGSizeMake(CGRectGetWidth(view.frame), kHeightScale(382));
    CGFloat layerHeight = finalSize.height * 0.2;
    CAShapeLayer *layer = [[CAShapeLayer alloc] init];
    UIBezierPath *bezier = [[UIBezierPath alloc] init];
    [bezier moveToPoint:(CGPointMake(0, finalSize.height - layerHeight))];
    [bezier addLineToPoint:(CGPointMake(0, finalSize.height - 1))];
    [bezier addLineToPoint:(CGPointMake(finalSize.width, finalSize.height - 1))];
    [bezier addLineToPoint:(CGPointMake(finalSize.width, finalSize.height - layerHeight))];
    [bezier addQuadCurveToPoint:CGPointMake(0,finalSize.height - layerHeight)
                   controlPoint:CGPointMake(finalSize.width / 2, (finalSize.height - layerHeight) - kHeightScale(90))];
    layer.path = bezier.CGPath;
    layer.fillColor = [UIColor whiteColor].CGColor;
    
    
    
    [view addSubview: backgroundImageView];
    [view.layer addSublayer:layer];
    [self addSubview:view];
    //头像显示
    _iconView=[[UIView alloc] initWithFrame:CGRectMake((UIScreenWidth/2-45), kHeightScale(185), kWidthScale(90), kHeightScale(90))];
    _iconView.backgroundColor = [UIColor colorWithRed:(213.0/255) green:(213.0/255) blue:(213.0/255) alpha:1];
    _iconView.layer.masksToBounds=YES;
    _iconView.layer.cornerRadius=kWidthScale(45);
    _iconView.layer.shadowColor = [UIColor blackColor].CGColor;
    _iconView.layer.shadowOffset = CGSizeMake(-5, 0);
    _iconView.layer.shadowOpacity = 0.5;
    _iconView.layer.shadowRadius = 4.0;
    _iconView.clipsToBounds = NO;
    
    _imageIcon=[[UIButton alloc] init];
    [_imageIcon setBackgroundImage:[UIImage imageNamed:@"1111"] forState:UIControlStateNormal];
    _imageIcon.layer.masksToBounds=YES;
    _imageIcon.layer.cornerRadius=kWidthScale(40);
    
    [_iconView addSubview:_imageIcon];
    [view addSubview:_iconView];
    //头像
    _imageIcon.sd_layout
    .topSpaceToView(_iconView, kHeightScale(5))
    .leftSpaceToView(_iconView, kWidthScale(5))
    .widthIs(kWidthScale(80))
    .heightIs(kHeightScale(80));
    //名字
    _nameLabel=[[UILabel alloc] init];
    _nameLabel.text=@"共想家啊啊啊啊啊";
    _nameLabel.textAlignment=YES;
    _nameLabel.textColor=[UIColor blackColor];
    _nameLabel.font=[UIFont systemFontOfSize:kWidthScale(15)];
    [view addSubview:_nameLabel];
    _nameLabel.sd_layout
    .topSpaceToView(self.iconView, kHeightScale(10))
    .leftSpaceToView(view, kWidthScale(120))
    .rightSpaceToView(view, kWidthScale(120))
    .autoHeightRatio(0);
    //图标
    _dengjiImage=[[UIImageView alloc] init];
    _dengjiImage.image=[UIImage imageNamed:@"dengjis"];
    [view addSubview:_dengjiImage];
    _dengjiImage.sd_layout
    .bottomEqualToView(self.nameLabel)
    .leftSpaceToView(self.nameLabel, kWidthScale(0))
    .widthIs(kWidthScale(12))
    .heightIs(kHeightScale(12));
    //等级显示
    _dengjiLabel=[[UILabel alloc] init];
    _dengjiLabel.text=@"100级";
    _dengjiLabel.textColor=[UIColor colorWithHexString:@"#999999"];
    _dengjiLabel.font=[UIFont systemFontOfSize:kWidthScale(10)];
    [view addSubview:_dengjiLabel];
    _dengjiLabel.sd_layout
    .bottomEqualToView(self.nameLabel)
    .leftSpaceToView(self.dengjiImage, kWidthScale(5))
    .widthIs(kWidthScale(35))
    .autoHeightRatio(0);
    //个性签名
    _autographField=[[UILabel alloc] init];
    _autographField.text=@"自我叙述：用一句话来证明自己的实力!";
    _autographField.font=[UIFont systemFontOfSize:kWidthScale(11)];
    _autographField.textColor=[UIColor colorWithHexString:@"#666666"];
    _autographField.textAlignment = NSTextAlignmentCenter;
    [view addSubview:_autographField];
    _autographField.sd_layout
    .topSpaceToView(self.nameLabel, kHeightScale(5))
    .leftSpaceToView(view, kWidthScale(20))
    .rightSpaceToView(view, kWidthScale(20))
    .autoHeightRatio(0);
    
    //气泡效果
    _cuteView = [[CuteView alloc]initWithPoint:CGPointMake(kWidthScale(30), UIScreenHeight - kHeightScale(470)) superView:view];
    _cuteView.viscosity  = 200;
    _cuteView.bubbleWidth = kWidthScale(50);
    //_cuteView.bubbleColor=[UIColor orangeColor];
    _cuteView.bubbleColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"qipao-1"]];
    [_cuteView setUp];
    //注意：设置 'bubbleLabel.text' 一定要放在 '-setUp' 方法之后
    //Tips:When you set the 'bubbleLabel.text',you must set it after '-setUp'
    _cuteView.bubbleLabel.text = @"索大大";
    _cuteView.bubbleLabel.font=[UIFont systemFontOfSize:kWidthScale(10)];
    _cuteView.bubbleLabel.textColor=[UIColor blackColor];
    //气泡效果1
    _cuteView1 = [[CuteView alloc]initWithPoint:CGPointMake(kWidthScale(80), UIScreenHeight - kHeightScale(570)) superView:view];
    _cuteView1.viscosity  = 0;
    _cuteView1.bubbleWidth = kWidthScale(50);
    _cuteView1.bubbleColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"qipao-1"]];
    [_cuteView1 setUp];
    //注意：设置 'bubbleLabel.text' 一定要放在 '-setUp' 方法之后
    //Tips:When you set the 'bubbleLabel.text',you must set it after '-setUp'
    _cuteView1.bubbleLabel.text = @"索大大";
    _cuteView1.bubbleLabel.font=[UIFont systemFontOfSize:kWidthScale(10)];
    _cuteView1.bubbleLabel.textColor=[UIColor blackColor];
    //气泡效果2
    _cuteView2 = [[CuteView alloc]initWithPoint:CGPointMake(kWidthScale(240), UIScreenHeight - kHeightScale(570)) superView:view];
    _cuteView2.viscosity  = 0;
    _cuteView2.bubbleWidth = kWidthScale(50);
    _cuteView2.bubbleColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"qipao-1"]];
    [_cuteView2 setUp];
    //注意：设置 'bubbleLabel.text' 一定要放在 '-setUp' 方法之后
    //Tips:When you set the 'bubbleLabel.text',you must set it after '-setUp'
    _cuteView2.bubbleLabel.text = @"索大大";
    _cuteView2.bubbleLabel.font=[UIFont systemFontOfSize:kWidthScale(10)];
    _cuteView2.bubbleLabel.textColor=[UIColor blackColor];
    //气泡效果3
    _cuteView3 = [[CuteView alloc]initWithPoint:CGPointMake(kWidthScale(290), UIScreenHeight - kHeightScale(470)) superView:view];
    _cuteView3.viscosity  = 0;
    _cuteView3.bubbleWidth = kWidthScale(50);
    _cuteView3.bubbleColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"qipao-1"]];
    [_cuteView3 setUp];
    //注意：设置 'bubbleLabel.text' 一定要放在 '-setUp' 方法之后
    //Tips:When you set the 'bubbleLabel.text',you must set it after '-setUp'
    _cuteView3.bubbleLabel.text = @"索大大";
    _cuteView3.bubbleLabel.font=[UIFont systemFontOfSize:kWidthScale(10)];
    _cuteView3.bubbleLabel.textColor=[UIColor blackColor];
    
    
}
//点击return 按钮 去掉
-(BOOL)textViewShouldEndEditing:(UITextView *)textView
{
    [textView resignFirstResponder];
    return YES;
}

#pragma mark - 共想家-视图一
//视图一
- (void)setViewOneUp{
    
    _viewOne=[[UIView alloc] initWithFrame:CGRectMake(0, kHeightScale(271), UIScreenWidth, kHeightScale(351))];
    //_viewOne.backgroundColor=[UIColor orangeColor];
    [self addSubview:_viewOne];
    
    //背景框
    _backgroundImage=[[UIView alloc] init];
    _backgroundImage.backgroundColor=[UIColor whiteColor];
    _backgroundImage.layer.masksToBounds=YES;
    _backgroundImage.layer.cornerRadius=5;
    _backgroundImage.layer.shadowColor = [UIColor blackColor].CGColor;
    _backgroundImage.layer.shadowOffset = CGSizeMake(0, 1);
    _backgroundImage.layer.shadowOpacity = 0.2;
    //        _shadowView.layer.shadowRadius = 6.0;
    //        _shadowView.layer.cornerRadius = 6.0;
    _backgroundImage.clipsToBounds = NO;
    [_viewOne addSubview:_backgroundImage];
    _backgroundImage.sd_layout
    .topSpaceToView(_viewOne, kHeightScale(0))
    .leftSpaceToView(_viewOne, kWidthScale(47))
    .rightSpaceToView(_viewOne, kWidthScale(47))
    .heightIs(kHeightScale(34));
    
    //关注
    _numOneBut=[[UIButton alloc] init];
    [_numOneBut setTitle:@" 45\n关注" forState:UIControlStateNormal];
    _numOneBut.titleLabel.numberOfLines = 0;
    [_numOneBut setTitleColor:[UIColor colorWithHexString:@"#666666"] forState:UIControlStateNormal];
    _numOneBut.titleLabel.font=[UIFont systemFontOfSize:kWidthScale(11)];
    _numOneBut.tag=100001;
    _backgroundImage.userInteractionEnabled=YES;
    [_backgroundImage addSubview:_numOneBut];
    _numOneBut.sd_layout
    .bottomSpaceToView(_backgroundImage, kHeightScale(2))
    .leftSpaceToView(_backgroundImage, kWidthScale(18))
    .widthIs(kWidthScale(40))
    .heightIs(kHeightScale(30));
    //粉丝
    _numTwoBut=[[UIButton alloc] init];
    [_numTwoBut setTitle:@" 45\n粉丝" forState:UIControlStateNormal];
    _numTwoBut.titleLabel.numberOfLines = 0;
    _numTwoBut.tag=100002;
    [_numTwoBut setTitleColor:[UIColor colorWithHexString:@"#666666"] forState:UIControlStateNormal];
    _numTwoBut.titleLabel.font=[UIFont systemFontOfSize:kWidthScale(11)];
    [_backgroundImage addSubview:_numTwoBut];
    _numTwoBut.sd_layout
    .bottomSpaceToView(_backgroundImage, kHeightScale(2))
    .leftSpaceToView(_backgroundImage, kWidthScale(85))
    .widthIs(kWidthScale(40))
    .heightIs(kHeightScale(30));
    //亲密
    _numCloseBut=[[UIButton alloc] init];
    [_numCloseBut setTitle:@" 45\n亲密" forState:UIControlStateNormal];
    _numCloseBut.titleLabel.numberOfLines = 0;
    _numCloseBut.tag=100000;
    [_numCloseBut setTitleColor:[UIColor colorWithHexString:@"#666666"] forState:UIControlStateNormal];
    _numCloseBut.titleLabel.font=[UIFont systemFontOfSize:kWidthScale(11)];
    [_backgroundImage addSubview:_numCloseBut];
    _numCloseBut.sd_layout
    .bottomSpaceToView(_backgroundImage, kHeightScale(2))
    .leftSpaceToView(_backgroundImage, kWidthScale(155))
    .widthIs(kWidthScale(40))
    .heightIs(kHeightScale(30));
    //收藏
    _numThreeBut=[[UIButton alloc] init];
    [_numThreeBut setTitle:@" 45\n收藏" forState:UIControlStateNormal];
    _numThreeBut.titleLabel.numberOfLines = 0;
    _numThreeBut.tag=100003;
    [_numThreeBut setTitleColor:[UIColor colorWithHexString:@"#666666"] forState:UIControlStateNormal];
    _numThreeBut.titleLabel.font=[UIFont systemFontOfSize:kWidthScale(11)];
    [_backgroundImage addSubview:_numThreeBut];
    _numThreeBut.sd_layout
    .bottomSpaceToView(_backgroundImage, kHeightScale(2))
    .rightSpaceToView(_backgroundImage, kWidthScale(21))
    .widthIs(kWidthScale(40))
    .heightIs(kHeightScale(30));
    //实名认证
    _certificationBut=[[UIButton alloc] init];
    [_certificationBut setBackgroundImage:[UIImage imageNamed:@"shiping"] forState:UIControlStateNormal];
    [_certificationBut setTitle:@"实名认证" forState:UIControlStateNormal];
    _certificationBut.tag=100004;
    [_certificationBut setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    _certificationBut.titleLabel.font = [UIFont systemFontOfSize:kWidthScale(12)];
    //_certificationBut.backgroundColor=[UIColor orangeColor];
    _certificationBut.titleEdgeInsets = UIEdgeInsetsMake(40, -19, 0, -20);
    [_viewOne addSubview:_certificationBut];
    _certificationBut.sd_layout
    .topSpaceToView(self.backgroundImage, kHeightScale(15))
    .leftEqualToView(self.backgroundImage)
    .widthIs(kWidthScale(18))
    .heightIs(kHeightScale(18));
    //参与
    _grabBut=[[UIButton alloc] init];
    [_grabBut setBackgroundImage:[UIImage imageNamed:@"canyu"] forState:UIControlStateNormal];
    [_grabBut setTitle:@"我的参与" forState:UIControlStateNormal];
    _grabBut.tag=100005;
    [_grabBut setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    _grabBut.titleLabel.font = [UIFont systemFontOfSize:kWidthScale(12)];
    //_certificationBut.backgroundColor=[UIColor orangeColor];
    _grabBut.titleEdgeInsets = UIEdgeInsetsMake(40, -19, 0, -20);
    [_viewOne addSubview:_grabBut];
    _grabBut.sd_layout
    .topSpaceToView(self.backgroundImage, kHeightScale(15))
    .leftSpaceToView(self.certificationBut, kWidthScale(49))
    .widthIs(kWidthScale(18))
    .heightIs(kHeightScale(18));
    //会议预约
    _predeterminedBut=[[UIButton alloc] init];
    [_predeterminedBut setBackgroundImage:[UIImage imageNamed:@"home_hyyy"] forState:UIControlStateNormal];
    [_predeterminedBut setTitle:@"会议预约" forState:UIControlStateNormal];
    _predeterminedBut.tag=100006;
    [_predeterminedBut setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    _predeterminedBut.titleLabel.font = [UIFont systemFontOfSize:kWidthScale(12)];
    //_certificationBut.backgroundColor=[UIColor orangeColor];
    _predeterminedBut.titleEdgeInsets = UIEdgeInsetsMake(40, -19, 0, -20);
    [_viewOne addSubview:_predeterminedBut];
    _predeterminedBut.sd_layout
    .topSpaceToView(self.backgroundImage, kHeightScale(15))
    .centerXEqualToView(self.backgroundImage)
    .widthIs(kWidthScale(18))
    .heightIs(kHeightScale(18));
    //举报
    _toReportBut=[[UIButton alloc] init];
    [_toReportBut setBackgroundImage:[UIImage imageNamed:@"jubao11"] forState:UIControlStateNormal];
    [_toReportBut setTitle:@"举报" forState:UIControlStateNormal];
    _toReportBut.tag=100007;
    [_toReportBut setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    _toReportBut.titleLabel.font = [UIFont systemFontOfSize:kWidthScale(12)];
    //_certificationBut.backgroundColor=[UIColor orangeColor];
    _toReportBut.titleEdgeInsets = UIEdgeInsetsMake(40, -14, 0, -14);
    [_viewOne addSubview:_toReportBut];
    _toReportBut.sd_layout
    .topSpaceToView(self.backgroundImage, kHeightScale(15))
    .leftSpaceToView(self.predeterminedBut, kWidthScale(51))
    .widthIs(kWidthScale(18))
    .heightIs(kHeightScale(18));
    //签到
    _signInBut=[[UIButton alloc] init];
    [_signInBut setBackgroundImage:[UIImage imageNamed:@"qiandao"] forState:UIControlStateNormal];
    [_signInBut setTitle:@"签到" forState:UIControlStateNormal];
    _signInBut.tag=100008;
    [_signInBut setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    _signInBut.titleLabel.font = [UIFont systemFontOfSize:kWidthScale(12)];
    //_certificationBut.backgroundColor=[UIColor orangeColor];
    _signInBut.titleEdgeInsets = UIEdgeInsetsMake(40, -14, 0, -14);
    [_viewOne addSubview:_signInBut];
    _signInBut.sd_layout
    .topSpaceToView(self.backgroundImage, kHeightScale(15))
    .rightEqualToView(self.backgroundImage)
    .widthIs(kWidthScale(18))
    .heightIs(kHeightScale(18));
    //水波球
    
    JinnWaveView *waveView = [[JinnWaveView alloc] initWithSideLength:150];
    [_viewOne addSubview:waveView];
    [waveView mas_makeConstraints:^(MASConstraintMaker *make) {
        //make.centerY.centerX.equalTo(self.viewOne);
        make.leftMargin.mas_offset(self.frame.size.width/2-85);
        make.bottomMargin.mas_offset(2);
        make.size.mas_equalTo(CGSizeMake(170, 170));
        
    }];
    
    // 显示没有水波纹的球形视图
    
    [waveView showBlankViewWithTitle:@"正在匹配中..."
                          titleColor:[UIColor whiteColor]
                     backgroundColor:[UIColor colorWithWhite:5 alpha:0.2]];
    // 2秒后显示带有水波纹进度的球形视图
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
        [waveView showWaveWaterWithPercent:30
                               description:@"共想家"
                                 textColor:[UIColor whiteColor]
                           backgroundColor:[UIColor colorWithRed:(209.0/255) green:(176.0/255) blue:(253.0/255) alpha:1]
                                 waveColor:[UIColor colorWithRed:(168.0/255) green:(100.0/255) blue:(252.0/255) alpha:1]];
        
        
    });
    
    //动画加载数据显示
    //背景框
    _backgroundImageYY=[[UIImageView alloc] init];
    _backgroundImageYY.image = [UIImage imageNamed:@"xunzhangbg-1"];
    _backgroundImageYY.layer.masksToBounds = YES;
    _backgroundImageYY.layer.cornerRadius = 5;
    _backgroundImageYY.contentMode = UIViewContentModeScaleAspectFit;
    _backgroundImageYY.layer.shadowColor = [UIColor blackColor].CGColor;
    _backgroundImageYY.layer.shadowOffset = CGSizeMake(0, 1);
    _backgroundImageYY.layer.shadowOpacity = 0.2;
    //        _shadowView.layer.shadowRadius = 6.0;
    //        _shadowView.layer.cornerRadius = 6.0;
    _backgroundImageYY.clipsToBounds = NO;
    [_viewOne addSubview:_backgroundImageYY];
    _backgroundImageYY.sd_layout
    .topSpaceToView(self.certificationBut, kHeightScale(36.5))
    .leftSpaceToView(_viewOne, kWidthScale(15))
    .rightSpaceToView(_viewOne, kWidthScale(15))
    .heightIs(kHeightScale(93));
    //加载动画
    for (int i = 0; i < 3; i++) {
        
        _percentView = [[ZPPercentView alloc] initWithFrame:CGRectMake(kWidthScale(0),kHeightScale(0),kWidthScale(56), kHeightScale(56))];
        _imagePercentView=[[UIImageView alloc] initWithFrame:CGRectMake(kWidthScale(28) * (i+1) - (-90*i), kHeightScale(4), kWidthScale(56), kHeightScale(56))];
        _imagePercentView.image=[UIImage imageNamed:@"bianlun-bg"];
        //_imagePercentView.backgroundColor=[UIColor orangeColor];
//        UILabel * lab =[[UILabel alloc] initWithFrame:CGRectMake(kWidthScale(28) * (i+1) - (-90*i), kHeightScale(4), kWidthScale(56), kHeightScale(56))];
//        lab.layer.masksToBounds=YES;
//        lab.layer.cornerRadius=kWidthScale(56/2);
//        lab.layer.borderWidth=kWidthScale(0.5);
//        lab.layer.borderColor=[UIColor redColor].CGColor;
        //lab.backgroundColor=[UIColor orangeColor];
        
        if (i == 0) {

            [_percentView updateZPPercent:@(39.0).floatValue openAnimation:YES font:[UIFont systemFontOfSize:kWidthScale(18)] sizeColor:[UIColor colorWithHexString:@"#333333"] isPercentage:YES];
            
        }else if (i == 1){

            [_percentView updateZPPercent:@(100.0).floatValue openAnimation:YES font:[UIFont systemFontOfSize:kWidthScale(18)] sizeColor:[UIColor colorWithHexString:@"#333333"] isPercentage:YES];
        }else{

            [_percentView updateZPPercent:@(39.0).floatValue openAnimation:YES font:[UIFont systemFontOfSize:kWidthScale(18)] sizeColor:[UIColor colorWithHexString:@"#333333"] isPercentage:YES];
        }
        
        _percentView.layer.masksToBounds=YES;
        _percentView.layer.cornerRadius=kWidthScale(56/2);
        _percentView.layer.borderWidth = kWidthScale(0.8);
        _percentView.layer.borderColor = [UIColor clearColor].CGColor;
        
        
        //[_backgroundImageYY addSubview:lab];
        [_backgroundImageYY addSubview:_imagePercentView];
        //[_backgroundImageYY addSubview:_percentViewBJ];
        [_imagePercentView addSubview:_percentView];
    }
    
    //辩论文字
    _bianlunText=[[UILabel alloc] init];
    _bianlunText.text=@"辩论进程";
    _bianlunText.textColor=[UIColor blackColor];
    _bianlunText.font=[UIFont systemFontOfSize:kWidthScale(12)];
    [_backgroundImageYY addSubview:_bianlunText];
    
    _bianlunText.sd_layout
    .topSpaceToView(self.percentView, kHeightScale(7))
    .leftSpaceToView(_backgroundImageYY, kWidthScale(31))
    .widthIs(60)
    .autoHeightRatio(0);
    //风暴文字
    _fengbaoText=[[UILabel alloc] init];
    _fengbaoText.text=@"风暴进程";
    _fengbaoText.textColor=[UIColor blackColor];
    _fengbaoText.font=[UIFont systemFontOfSize:kWidthScale(12)];
    [_backgroundImageYY addSubview:_fengbaoText];
    
    _fengbaoText.sd_layout
    .topSpaceToView(self.percentView, kHeightScale(7))
    .leftSpaceToView(self.bianlunText, kWidthScale(59))
    .widthIs(60)
    .autoHeightRatio(0);
    //讨论文字
    _taolunText=[[UILabel alloc] init];
    _taolunText.text=@"讨论进程";
    _taolunText.textColor=[UIColor blackColor];
    _taolunText.font=[UIFont systemFontOfSize:kWidthScale(12)];
    [_backgroundImageYY addSubview:_taolunText];
    
    _taolunText.sd_layout
    .topSpaceToView(self.percentView, kHeightScale(7))
    .leftSpaceToView(_fengbaoText, kWidthScale(60))
    .widthIs(60)
    .autoHeightRatio(0);
}



@end
